public class EncryptFacade extends AbstractEncryptFacade{

    private FileReader reader;
    private CipherMachine cipher;
    private FileWriter writer;

    public EncryptFacade() {
        reader = new FileReader();
        cipher = new CipherMachine();
        writer = new FileWriter();
    }

    @Override
    public void fileEncrypt() {
        String text = reader.read();
        String encryptText = cipher.encrypt(text);  //进行加密
        writer.write(encryptText);
    }
}
